<template>
    <!-- 添加或修改盘点计划对话框 -->
    <el-dialog :title="title" v-if="open" v-model="open" width="600px" append-to-body>
        <div style="margin-bottom: 10px;">
            <span>快递单总数：</span>
            <span style="color: red;">2</span>
        </div>
        <el-descriptions :labelStyle="labelStyle" class="margin-top" :column="1" size="large" border>
            <el-descriptions-item>
                <template #label>
                    <i class="el-icon-location-outline"></i>
                    发货点选择
                </template>
                <el-select style="width: 100%;" v-model="form.add" value-key="" placeholder="" clearable filterable>
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>

            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <i class="el-icon-user"></i>
                    发货人姓名
                </template>
                <el-input style="width: 100%;" v-model="form.send" placeholder="请输入发货人姓名" size="normal"
                    clearable></el-input>
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <i class="el-icon-location-outline"></i>
                    所在区域
                </template>
                <el-cascader style="width: 100%;" :options="areaOptions" v-model="selectedOptions">
                </el-cascader>
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <i class=" el-icon-office-building"></i>
                    详情地址
                </template>
                <el-input style="width: 100%;" v-model="form.send" placeholder="请输入收货地址" size="normal"
                    clearable></el-input>
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <i class="el-icon-mobile-phone"></i>
                    联系电话
                </template>
                <el-input style="width: 100%;" v-model="form.send" placeholder="请输入联系电话" size="normal"
                    clearable></el-input>
            </el-descriptions-item>
        </el-descriptions>

        <div style="margin: 10px 0;">
            <span>选择快递单模板</span>
        </div>
        <el-descriptions :labelStyle="labelStyle" class="margin-top" :column="1" size="large" border>
            <el-descriptions-item>
                <template #label>
                    <i class="el-icon-menu"></i>
                    选择模板
                </template>
                <el-select style="width: 100%;" v-model="form.add" value-key="" placeholder="" clearable filterable>
                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
            </el-descriptions-item>
            <el-descriptions-item>
                <template #label>
                    <i class="el-icon-notebook-2"></i>
                    起始单号
                </template>
                <el-input style="width: 100%;" v-model="form.send" placeholder="请输入发货人姓名" size="normal"
                    clearable></el-input>
            </el-descriptions-item>
        </el-descriptions>

        <template #footer>
            <div class="dialog-footer">
                <el-button @click="cancel">取 消</el-button>
                <el-button type="primary" @click="submitForm">确定</el-button>
            </div>
        </template>
    </el-dialog>
</template>

<script>
import modelMixin from '@/mixins/modelMixin'
import {
    provinceAndCityData,
    pcTextArr,
    regionData,
    pcaTextArr,
    codeToText,
} from "element-china-area-data";
export default {
    name: "addForm",
    mixins: [modelMixin],
    data() {
        return {
            open: false,
            title: "打印快递单",
            form: {},
            options: [],
            areaOptions: regionData,
            selectedOptions: [],
            labelStyle: {
                width: '160px',
                'text-align': 'right'
            }
        }
    },
    created() {
    },
    methods: {
        show() {
            this.open = true;
        },
        cancel() {
            this.open = false;
        },
    }
}
</script>

<style lang="scss" scoped></style>